package com.srit.vgt.dao;

import com.srit.vgt.common.parent.ParentDao;
import com.srit.vgt.entity.WeighInfo;
import org.springframework.data.jpa.repository.Query;

public interface WeighInfoDao extends ParentDao<WeighInfo, Long> {



    @Query(nativeQuery = true, value = "select count(0) from weighinfo where uploadDevice = ?1 and to_days(insertDateTime) = to_days(CURDATE()) - 1 ")
    int getWeighNum(String uploadId);


    @Query(nativeQuery = true, value = "select sum(price) from weighinfo where uploadDevice = ?1 and to_days(insertDateTime) = to_days(CURDATE()) - 1 ")
    Double getWightPrice(String uploadId);
}
